import React from "react";
import { BrowserRouter, Route, Switch } from "react-router-dom";
import Demo01 from "./pages/demo01";
import Demo02 from "./pages/demo02";
import Context from "./pages/context";
import ReduxDemo01 from "./pages/reduxDemo01";
import FromRouter from "./pages/fromRouter";
import Portals from "./pages/portals";
import TuoFang from "./pages/tuoFang";
import "./App.css";

function App() {
  return (
    <div className="App">
      <BrowserRouter>
        <Switch>
          <Route path="/demo01" component={Demo01}></Route>
          <Route path="/demo02" component={Demo02}></Route>
          <Route path="/context" component={Context}></Route>
          <Route path="/reduxDemo01" component={ReduxDemo01}></Route>
          <Route path="/fromRouter" component={FromRouter}></Route>
          <Route path="/portals" component={Portals}></Route>
          <Route path="/tuoFang" component={TuoFang}></Route>
        </Switch>
      </BrowserRouter>
    </div>
  );
}

export default App;
